#include "teststdafx.h"
#include "stdafx.h"
#include <gtest/gtest.h>

#include "Utils/SimpleStringCoder.h"

class UtilsTest : public testing::Test
{
protected:

	virtual void SetUp()
	{
	}

	virtual void TearDown()
	{

	}
};

TEST_F(UtilsTest,EncodeStringTest)
{
	char const* msg = "1234567890";
	char buff[4096] = "";
	SimpleStringCoder::Encode(msg,buff,4096);
	EXPECT_STREQ("1I1J1K1L1M1N1O1P1Q1H",buff);
}


TEST_F(UtilsTest,NotEnoughSpaceEncodeStringTest)
{
	char const* msg = "1234567890";
	char buff[19] = "";
	SimpleStringCoder::Encode(msg,buff,19);
	EXPECT_STREQ("1I1J1K1L1M1N1O1P1Q",buff);
}
